package org.ykh.gmall.product.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.ykh.gmall.product.BaseCategoryView;
import org.ykh.gmall.product.dto.CategoryDto;

import java.util.List;
import java.util.Map;

/**
 * CREATE VIEW base_category_view AS
 * select
 * c3.id as id,
 * c1.id as category1_id, c1.name as category1_name,
 * c2.id as category2_id, c2.name as category2_name,
 * c3.id as category3_id, c3.name as category3_name
 * from base_category1 c1
 * inner join base_category2 c2 on c2.category1_id = c1.id
 * inner join base_category3 c3 on c3.category2_id = c2.id
 */
@Mapper
public interface BaseCategoryViewMapper  extends BaseMapper<BaseCategoryView> {

    void resetRowNumbeRselectLevelBefor();

    void resetPrevCategory1IdSelectLevelBefor();

    List<CategoryDto> selectLevel();

}
